package com.qs.questionnairesurveysystem.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//CREATE TABLE answers (
//        answerId BIGINT AUTO_INCREMENT PRIMARY KEY,  -- 答案ID，主键，自增
//        surveyId BIGINT NOT NULL,                    -- 问卷ID
//        questionId BIGINT NOT NULL,                  -- 问题ID
//        respondent VARCHAR(255) NOT NULL,             -- 被调查者
//        content TEXT NOT NULL,                        -- 答案内容
//        respondentId BIGINT NOT NULL,                  -- 问题ID
//        isValid BOOLEAN DEFAULT TRUE,                -- 是否有效
//        FOREIGN KEY (surveyId) REFERENCES survey(surveyId) ON DELETE CASCADE, -- 外键：关联问卷表
//        FOREIGN KEY (questionId) REFERENCES questions(questionId) ON DELETE CASCADE, -- 外键：关联问题表
//        FOREIGN KEY (respondentId) REFERENCES user(userId) ON DELETE CASCADE -- 外键：关联用户表
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Answer {

    private Long answerId;

    private Long surveyId;

    private Long questionId;

    private String respondent;

    private Long respondentId;

    private String content;

    private Boolean isValid;

}
